<include file="public/min-header"/>
<link href="__PUBLIC__/plugins/daterangepicker/daterangepicker-bs3.css" rel="stylesheet" type="text/css" />
<script src="__PUBLIC__/plugins/daterangepicker/moment.min.js" type="text/javascript"></script>
<script src="__PUBLIC__/plugins/daterangepicker/daterangepicker.js" type="text/javascript"></script>
<script src="__PUBLIC__/plugins/jQuery-chosen/js/chosen.jquery.js" type="text/javascript"></script>
<link href="__PUBLIC__/plugins/jQuery-chosen/css/chosen.css" rel="stylesheet" type="text/css" />

<div class="wrapper">
    <include file="public/breadcrumb"/>
    <section class="content ">
        <!-- Main content -->
        <div class="container-fluid">

            <div class="panel panel-default">
                <div class="panel-body ">
                    <!--表单数据-->
                    <form method="post" id="handle_shop">

                        <!--通用信息-->
                        <div class="tab-content col-md-10">
                            <div class="tab-pane active" id="tab_tongyong">
                                <table class="table table-bordered">
                                    <tbody>

                                    <tr>
                                        <td class="col-sm-2"><span style="color:#F00;">*</span>绑定用户：</td>
                                        <td class="col-sm-8">
                                            <select class="form-control" name="userId" id="userId">
                                                <option value=""></option>
                                                <volist name="user" id="vo">
                                                    <option value="{$vo.userId}">{$vo.nickName}--{$vo.userMobile}</option>
                                                </volist>
                                            </select>
                                        </td>
                                    </tr>

                                    <tr>
                                        <td class="col-sm-2"><span style="color:#F00;">*</span>教练名称：</td>
                                        <td class="col-sm-8">
                                            <input type="text" class="form-control" name="coachName" placeholder="请输入教练名称">
                                        </td>
                                    </tr>

                                    <tr>
                                        <td><span style="color:#F00;">*</span>头像：</td>
                                        <td class="col-sm-8">
                                            <div class="col-sm-4">
                                                <input type="text" class="form-control" style="width:350px;margin-left:-15px;" name="coachPicture" id="coachPicture" >
                                            </div>
                                            <div class="col-sm-4">
                                                <input type="button" class="btn btn-default" onClick="GetUploadify(1,'coachPicture','coach','')"  value="上传头像图"/>
                                            </div>
                                        </td>
                                    </tr>

                                    <tr>
                                        <td>静态图：</td>
                                        <td class="col-sm-8">
                                            <div class="col-sm-4">
                                                <input type="text" class="form-control" style="width:350px;margin-left:-15px;" name="coachImg" id="coachImg" >
                                            </div>
                                            <div class="col-sm-4">
                                                <input type="button" class="btn btn-default" onClick="GetUploadify(1,'coachImg','coach','')"  value="上传静态图"/>
                                            </div>
                                        </td>
                                    </tr>

                                    <tr>
                                        <td class="col-sm-2"><span style="color:#F00;">*</span>教练职称：</td>
                                        <td class="col-sm-8">
                                            <input type="text" class="form-control" name="coachRank" placeholder="请输入教练职称">
                                        </td>
                                    </tr>

                                    <tr>
                                        <td class="col-sm-2"><span style="color:#F00;">*</span>教练标签：</td>
                                        <td class="col-sm-8">
                                            <input type="text" class="form-control" name="coachLabel" placeholder="请输入教练标签">
                                            <span style="color:#F00;">可添加多个，多个以英文逗号隔开即可。eq：挥杆调教,长杆教学,短杆教学</span>
                                        </td>
                                    </tr>

                                    <tr>
                                        <td class="col-sm-2"><span style="color:#F00;">*</span>所属店铺：</td>
                                        <td class="col-sm-8">
                                            <select class="form-control" name="coachShopId">
                                                <option value="">==请选择所属店铺==</option>

                                                <volist name="shopList" id="shopList">
                                                    <option value="{$shopList.shopId}">{$shopList.shopName}</option>
                                                </volist>

                                            </select>
                                        </td>
                                    </tr>

                                    <tr>
                                        <td class="col-sm-2"><span style="color:#F00;">*</span>余额：</td>
                                        <td class="col-sm-8">
                                            <input type="number" class="form-control" name="coach_balance">
<!--                                            <span style="color:#F00;">增加-即输入正数；扣除-即输入负数</span>-->
                                        </td>
                                    </tr>


                                    <tr>
                                        <td>教练个人简介:</td>
                                        <td class="col-sm-8">
                                            <textarea class="form-control" rows="10" cols="60" name="coachContent"></textarea>
                                        </span>
                                        </td>
                                    </tr>

                                    <tr>
                                        <td><span style="color:#F00;">*</span>展示状态：</td>
                                        <td>
                                            <input type="radio" name="coachStatus" value="1" checked="checked" > 展示
                                            <input type="radio" name="coachStatus" value="0"> 关闭
                                        </td>
                                    </tr>

                                    <tr>
                                        <td class="col-sm-2">排序：</td>
                                        <td class="col-sm-8">
                                            <input type="number" class="form-control" name="coachSort" value="99">
                                            <span style="color:#F00;">数字越小，排序越靠前</span>
                                        </td>
                                    </tr>


                                    </tbody>
                                    <tfoot>
                                    <tr>
                                        <td></td>
                                        <td class="text-right"><input class="btn btn-primary" type="button" onclick="shop_submit()" value="保存"></td>
                                    </tr>
                                    </tfoot>
                                </table>
                            </div>
                        </div>
                    </form><!--表单数据-->
                </div>
            </div>
        </div>
    </section>
</div>
<script>
    $('#userId').chosen();
    function shop_submit(){
        ajax_form_submit("handle_shop", "{:url('coach/doAdd')}");
    }
</script>
</body>
</html>